<title>Avatar</title>
<script>
var sLangDir=dialogArguments.oUtil.langDir;
document.write("<scr"+"ipt src='language/"+sLangDir+"/image.js'></scr"+"ipt>");
function doInsert(ctr)
	{	
	if(!dialogArguments.oUtil.obj.checkFocus()){this.close();return;}//Focus stuff
	var oEditor=dialogArguments.oUtil.oEditor;
	var oSel=oEditor.document.selection.createRange();

	if (oSel.parentElement)	oElement=oSel.parentElement();
	else oElement=oSel.item(0);		
	dialogArguments.oUtil.obj.doCmd("InsertImage",ctr.src);	
	self.close();
	}				
</script>
<table width=100% height=100% align=center cellpadding=0 cellspacing=0 border=0>
<%   
Whichfolder=server.mappath("/Scripts/editor/Smileys/")  
Dim fs, f, f1, fc  
Set fs = CreateObject("Scripting.FileSystemObject")  
Set f = fs.GetFolder(Whichfolder)  
Set fc = f.files 
dim iCount
iCount = 0
For Each f1 in fc  
if (iCount mod 10 = 0) then
%>
	<tr>
<%
End if
 	iCount = iCount + 1
if (f1.name <> "Thumbs.db") then
%>

<td align="center" width="12%"><img style="cursor:hand" alt="<% = f1.name  %>.gif" src="Smileys/<% = f1.name  %>" onclick="doInsert(this);"></img> </td>

<%  
end if
if (iCount mod 10 = 0) then
%>
	</tr>
<%
End if	
Next  
%>
</table>